package com.sx.water.modules.sever.impl;

import com.sx.water.datasourcse.DataSourceNames;
import com.sx.water.datasourcse.annnotiaon.DataSource;
import com.sx.water.modules.dao.WaterRainDao;
import com.sx.water.modules.entity.WaterRainBo;
import com.sx.water.modules.sever.WaterRainServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @description: 水利 接口实现类
 * @author: taoxi
 * @create: 2018-12-12 11:01
 **/
@Service
public class WaterRainImpl implements WaterRainServer{
    @Autowired
    WaterRainDao waterRainDao;

//    @DataSource(name = DataSourceNames.THIRD)
    @Override
    public List<Map<String, Object>> selectWaterRain(WaterRainBo waterRainBo) {
        return waterRainDao.selectWaterRain(waterRainBo);
    }

//    @DataSource(name = DataSourceNames.THIRD)
    @Override
    public List<Map<String, Object>> selectWaterRainByTime(WaterRainBo waterRainBo) {
        return waterRainDao.selectWaterRainByTime(waterRainBo);
    }

//    @DataSource(name = DataSourceNames.THIRD)
    @Override
    public List<String> selectWaterByTime(WaterRainBo waterRainBo) {
        return waterRainDao.selectWaterByTime(waterRainBo);
    }

//    @DataSource(name = DataSourceNames.THIRD)
    @Override
    public List<Map<String, Object>> selectWaterByTimeAndStation(WaterRainBo waterRainBo) {
        return waterRainDao.selectWaterByTimeAndStation(waterRainBo);
    }

//    @DataSource(name = DataSourceNames.THIRD)
    @Override
    public String selectMaxTime() {
        return waterRainDao.selectMaxTime();
    }
}
